<?php


namespace app\admin\controller;


use app\service\Jurisdiction;
use app\service\Y;

class Main extends BaseAdmin
{

    /**
     * 获取菜单数据
     * @return \think\response\Json
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function menu(): \think\response\Json
    {
        $config = config('setting');
        $config['menuInfo'] = Jurisdiction::getShowMenu();
        return Y::success($config, '菜单数据');
    }
}